Remove CONFIG_VMX and CONFIG_SVM compile options. Support
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 6 Feb 2006 22:33:58 +0000 (23:33 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Mon, 6 Feb 2006 22:33:58 +0000 (23:33 +0100)
will always be compiled into Xen.

Signed-off-by: Keir Fraser <keir@xensource.com>
26 files changed:
xen/arch/x86/cpu/amd.c
xen/arch/x86/cpu/intel.c
xen/arch/x86/hvm/svm/emulate.c
xen/arch/x86/hvm/svm/instrlen.c
xen/arch/x86/hvm/svm/intr.c
xen/arch/x86/hvm/svm/svm.c
xen/arch/x86/hvm/svm/vmcb.c
xen/arch/x86/hvm/svm/x86_32/exits.S
xen/arch/x86/hvm/svm/x86_64/exits.S
xen/arch/x86/hvm/vmx/io.c
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/hvm/vmx/vmx.c
xen/arch/x86/hvm/vmx/x86_32/exits.S
xen/arch/x86/hvm/vmx/x86_64/exits.S
xen/arch/x86/x86_32/asm-offsets.c
xen/arch/x86/x86_64/asm-offsets.c
xen/include/asm-x86/config.h
xen/include/asm-x86/hvm/svm/emulate.h
xen/include/asm-x86/hvm/svm/intr.h
xen/include/asm-x86/hvm/svm/svm.h
xen/include/asm-x86/hvm/svm/vmcb.h
xen/include/asm-x86/hvm/svm/vmmcall.h
xen/include/asm-x86/hvm/vcpu.h
xen/include/asm-x86/hvm/vmx/cpu.h
xen/include/asm-x86/hvm/vmx/vmcs.h
xen/include/asm-x86/hvm/vmx/vmx.h

index 9a21147ca5bbe0ee6e1b21980db1c50b420e83a2..6dcf15c5274606f9de2329f5169da1c89cc4b745 100644 (file)
@@ -248,9 +248,7 @@ static void __init init_amd(struct cpuinfo_x86 *c)
        }
 #endif
 
-#ifdef CONFIG_SVM
        start_svm();
-#endif
 }
 
 static unsigned int amd_size_cache(struct cpuinfo_x86 * c, unsigned int size)
index 98fe22ba8798f1f3894b97f5c2fe397440b82538..9062b8786a756e76d371cdc90c72e62e45d2f876 100644 (file)
@@ -187,9 +187,7 @@ static void __init init_intel(struct cpuinfo_x86 *c)
        if (c->x86 == 6) 
                set_bit(X86_FEATURE_P3, c->x86_capability);
 
-#ifdef CONFIG_VMX
        start_vmx();
-#endif
 }
 
 
index 32be10f28c829f5ae83df2d8533169635491dcd9..4ac1375f4939573cf0b0cdf0f3b37bd4f75658ff 100644 (file)
@@ -27,8 +27,6 @@
 #include <asm/hvm/svm/vmcb.h>
 #include <asm/hvm/svm/emulate.h>
 
-#ifdef CONFIG_SVM
-
 extern int inst_copy_from_guest(unsigned char *buf, unsigned long guest_eip,
         int inst_len);
 
@@ -504,7 +502,6 @@ unsigned int __get_instruction_length_from_list(struct vmcb_struct *vmcb,
             "eip = %lx\n",  __func__, (unsigned long)vmcb->rip);
     return 0;
 }
-#endif /* CONFIG_SVM */
 
 /*
  * Local variables:
index 4466ae7b4615e5a6724b5c548e462dd22f57b25a..07743820c9b21d443c793ce7b87620aac22359d4 100644 (file)
@@ -23,7 +23,6 @@
 #define DPRINTF DPRINTK
 #include <asm-x86/x86_emulate.h>
 
-#ifdef CONFIG_SVM
 /*
  * Opcode effective-address decode tables.
  * Note that we only emulate instructions that have at least one memory
@@ -432,4 +431,3 @@ cannot_emulate:
     svm_dump_inst(_regs.eip);
     return (unsigned long)-1;
 }
-#endif /* CONFIG_SVM */
index e63ad8ce1aafc5cfa2f9011c1f6bf03540805622..9ddaacee7aa5b35e8f8dbde26dfb10b2bd07dfb9 100644 (file)
@@ -38,8 +38,6 @@
 #include <public/hvm/ioreq.h>
 #include <xen/domain_page.h>
 
-#ifdef CONFIG_SVM
-
 /*
  * Most of this code is copied from vmx_io.c and modified 
  * to be suitable for SVM.
@@ -206,8 +204,6 @@ asmlinkage void svm_intr_assist(void)
     }
 }
 
-#endif /* CONFIG_SVM */
-
 /*
  * Local variables:
  * mode: C
index 4a15f8cd6c3db1091a3610293fefcc8c98157abc..ba99592b6fe267ee1bcf10daec5026ff8ce6521e 100644 (file)
@@ -50,8 +50,6 @@
 #include <public/sched.h>
 #include <public/hvm/ioreq.h>
 
-#ifdef CONFIG_SVM
-
 #define SVM_EXTRA_DEBUG
 
 #ifdef TRACE_BUFFER
@@ -2698,7 +2696,6 @@ asmlinkage void svm_asid(void)
     }
     clear_bit(ARCH_SVM_VMCB_ASSIGN_ASID, &v->arch.hvm_svm.flags);
 }
-#endif /* CONFIG_SVM */
 
 /*
  * Local variables:
index 74bef8c251280e019adcdcc2c7162fad5ce147f3..f55b88dc4541ab7e15ee1d67dfb8db2a8f779438 100644 (file)
@@ -36,8 +36,6 @@
 #include <xen/kernel.h>
 #include <xen/domain_page.h>
 
-#ifdef CONFIG_SVM
-
 extern int svm_dbg_on;
 extern int asidpool_assign_next( struct vmcb_struct *vmcb, int retire_current,
                                   int oldcore, int newcore);
@@ -589,7 +587,6 @@ void svm_dump_vmcb(const char *from, struct vmcb_struct *vmcb)
     svm_dump_sel("IDTR", &vmcb->idtr);
     svm_dump_sel("TR", &vmcb->tr);
 }
-#endif /* CONFIG_SVM */
 
 /*
  * Local variables:
index 9528f16a1e46be9cfb7f207af61f0582514b83c1..33a027407879c560a5263bab64ef8c2898e7c33a 100644 (file)
@@ -80,8 +80,6 @@
         popl %eax;  \
         addl $(NR_SKIPPED_REGS*4), %esp
 
-#ifdef CONFIG_SVM
-
         ALIGN
 
 #define VMRUN  .byte 0x0F,0x01,0xD8
@@ -216,5 +214,3 @@ svm_process_softirqs:
         sti       
         call do_softirq
         jmp  svm_test_all_events
-#endif /* CONFIG_SVM */
-
index 3e8eadbe02e4c9434259c9b924b9960fa57fb893..b299295a6a2d432dc0f0022109856aa63b389f75 100644 (file)
@@ -92,7 +92,6 @@
         popq %rdi; \
         addq $(NR_SKIPPED_REGS*8), %rsp; \
 
-#ifdef CONFIG_SVM
 #define VMRUN  .byte 0x0F,0x01,0xD8
 #define VMLOAD .byte 0x0F,0x01,0xDA
 #define VMSAVE .byte 0x0F,0x01,0xDB
@@ -175,5 +174,3 @@ svm_process_softirqs:
         sti
         call do_softirq
         jmp  svm_test_all_events
-#endif /* CONFIG_SVM */
-
index 7b3975194c7942d68e1326cf53a2e4cc4f5d5341..0d9449bb022211b1c709df946eccd86fda42ea72 100644 (file)
@@ -38,8 +38,6 @@
 #include <asm/hvm/vlapic.h>
 #include <public/hvm/ioreq.h>
 
-#ifdef CONFIG_VMX
-
 #define BSP_CPU(v)    (!(v->vcpu_id))
 
 void vmx_set_tsc_shift(struct vcpu *v, struct hvm_virpit *vpit)
@@ -194,7 +192,6 @@ void vmx_do_resume(struct vcpu *v)
     /* We can't resume the guest if we're waiting on I/O */
     ASSERT(!test_bit(ARCH_HVM_IO_WAIT, &v->arch.hvm_vcpu.ioflags));
 }
-#endif /* CONFIG_VMX */
 
 /*
  * Local variables:
index 0163e2133bb3c8b5c8906429b1f3191ba8166e60..70bc6111f3a47789209ddfc91d9a66859eaee9c8 100644 (file)
@@ -39,8 +39,6 @@
 #include <asm/shadow_64.h>
 #endif
 
-#ifdef CONFIG_VMX
-
 int vmcs_size;
 
 struct vmcs_struct *alloc_vmcs(void)
@@ -539,7 +537,6 @@ void arch_vmx_do_launch(struct vcpu *v)
     vmx_do_launch(v);
     reset_stack_and_jump(vmx_asm_do_launch);
 }
-#endif /* CONFIG_VMX */
 
 /*
  * Local variables:
index 9f9e1cc446f17b2dda0ebff767dc851ca481baa7..87324155ebcc48d5192d3c08ca1e528256695295 100644 (file)
@@ -48,9 +48,6 @@
 #include <asm/hvm/vpic.h>
 #include <asm/hvm/vlapic.h>
 
-
-#ifdef CONFIG_VMX
-
 static unsigned long trace_values[NR_CPUS][4];
 #define TRACE_VMEXIT(index,value) trace_values[smp_processor_id()][index]=value
 
@@ -2001,7 +1998,6 @@ asmlinkage void vmx_trace_vmexit (void)
     TRACE_3D(TRC_VMEXIT,0,0,0);
     return;
 }
-#endif /* CONFIG_VMX */
 
 /*
  * Local variables:
index 5650683a0616bd6090c255fbfdfcd14a4eea9b77..7846cca10be4febb71c12f9c46eb412b3b2b195c 100644 (file)
@@ -81,8 +81,6 @@
 
         ALIGN
 
-#ifdef CONFIG_VMX
-
 ENTRY(vmx_asm_vmexit_handler)
         /* selectors are restored/saved by VMX */
         HVM_SAVE_ALL_NOSEGREGS
@@ -148,5 +146,3 @@ ENTRY(vmx_asm_do_resume)
 
 ENTRY(vmx_asm_do_relaunch)
     vmx_asm_common 1 1
-
-#endif /* CONFIG_VMX */
index bfc581e46162cf14ba028e6f4ea1f03047ddce23..bd411fa527c1d966a0cfb5cc95700f09915c09db 100644 (file)
@@ -91,7 +91,6 @@
         popq %rdi; \
         addq $(NR_SKIPPED_REGS*8), %rsp; \
 
-#ifdef CONFIG_VMX
 ENTRY(vmx_asm_vmexit_handler)
         /* selectors are restored/saved by VMX */
         HVM_SAVE_ALL_NOSEGREGS
@@ -155,6 +154,3 @@ ENTRY(vmx_asm_do_resume)
 
 ENTRY(vmx_asm_do_relaunch)
       vmx_asm_common 1 1
-
-#endif /* CONFIG_VMX */
-
index cda414b5a5ad02dd4648ec696e12bfe6e2d66771..a7e970b92bda2bca48bbb6e27574fc2dbefa5c9c 100644 (file)
@@ -72,7 +72,6 @@ void __dummy__(void)
     DEFINE(_VCPUF_nmi_masked, _VCPUF_nmi_masked);
     BLANK();
 
-#ifdef CONFIG_SVM
     OFFSET(VCPU_svm_vmcb_pa, struct vcpu, arch.hvm_svm.vmcb_pa);
     OFFSET(VCPU_svm_hsa_pa,  struct vcpu, arch.hvm_svm.host_save_pa);
     OFFSET(VCPU_svm_vmcb, struct vcpu, arch.hvm_svm.vmcb);
@@ -82,7 +81,6 @@ void __dummy__(void)
     OFFSET(VMCB_rax, struct vmcb_struct, rax);
     OFFSET(VMCB_tsc_offset, struct vmcb_struct, tsc_offset);
     BLANK();
-#endif
 
     OFFSET(VCPUINFO_upcall_pending, vcpu_info_t, evtchn_upcall_pending);
     OFFSET(VCPUINFO_upcall_mask, vcpu_info_t, evtchn_upcall_mask);
index 499ca070570f1ffab6a0c57045d3f9f63275e1df..91e9e810278ca96acfad92784a1345559677a4cc 100644 (file)
@@ -72,7 +72,6 @@ void __dummy__(void)
     DEFINE(_VCPUF_nmi_masked, _VCPUF_nmi_masked);
     BLANK();
 
-#ifdef CONFIG_SVM
     OFFSET(VCPU_svm_vmcb_pa, struct vcpu, arch.hvm_svm.vmcb_pa);
     OFFSET(VCPU_svm_hsa_pa,  struct vcpu, arch.hvm_svm.host_save_pa);
     OFFSET(VCPU_svm_vmcb, struct vcpu, arch.hvm_svm.vmcb);
@@ -82,7 +81,6 @@ void __dummy__(void)
     OFFSET(VMCB_rax, struct vmcb_struct, rax);
     OFFSET(VMCB_tsc_offset, struct vmcb_struct, tsc_offset);
     BLANK();
-#endif
 
     OFFSET(VCPUINFO_upcall_pending, vcpu_info_t, evtchn_upcall_pending);
     OFFSET(VCPUINFO_upcall_mask, vcpu_info_t, evtchn_upcall_mask);
index bc65b72507266a3b72ffb49ef20848bb9a752e66..27ae8c3a9671d5e602811712ea753b2f662ae145 100644 (file)
@@ -18,8 +18,6 @@
 #define CONFIG_X86 1
 #define CONFIG_X86_HT 1
 #define CONFIG_SHADOW 1
-#define CONFIG_VMX 1
-#define CONFIG_SVM 1
 #define CONFIG_SMP 1
 #define CONFIG_X86_LOCAL_APIC 1
 #define CONFIG_X86_GOOD_APIC 1
index 1dba0119697e176a7e0117fe681e66b87cc298d4..d9a9a2896121cb06a3b0154594e4f2f91cd11fb3 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef __ASM_X86_HVM_SVM_EMULATE_H__
 #define __ASM_X86_HVM_SVM_EMULATE_H__
 
-#ifdef CONFIG_SVM
-
 typedef enum OPERATING_MODE_ {
     INVALID_OPERATING_MODE = -1,
     LEGACY_MODE,
@@ -146,8 +144,6 @@ static void inline __update_guest_eip(struct vmcb_struct *vmcb,
     vmcb->rip += inst_len;
 }
 
-#endif /* CONFIG_SVM */
-
 #endif /* __ASM_X86_HVM_SVM_EMULATE_H__ */
 
 /*
index 763545ec007331ef12992a0890a9bbd3133205cb..1a5fb5e312b3ed4aea571f84b5ddbf3046435d9a 100644 (file)
 #ifndef __ASM_X86_HVM_SVM_INTR_H__
 #define __ASM_X86_HVM_SVM_INTR_H__
 
-#ifdef CONFIG_SVM
-
 extern void svm_set_tsc_shift(struct vcpu *v, struct hvm_virpit *vpit);
 extern void svm_intr_assist(void);
 extern void svm_intr_assist_update(struct vcpu *v, int highest_vector);
 extern void svm_intr_assist_test_valid(struct vcpu *v, 
         unsigned long *intr_result);
 
-#endif /* CONFIG_SVM */
-
 #endif /* __ASM_X86_HVM_SVM_INTR_H__ */
index 3fc54c638c10807539ff89cf88d1fd5f59660533..097fd2da1a687aa2ad28ec85901a74c1fea10a9d 100644 (file)
@@ -28,7 +28,6 @@
 #include <asm/hvm/svm/vmcb.h>
 #include <asm/i387.h>
 
-#ifdef CONFIG_SVM
 extern void asidpool_retire( struct vmcb_struct *vmcb, int core );
 
 extern void svm_asm_vmexit_handler(struct cpu_user_regs);
@@ -86,6 +85,4 @@ struct asid_pool {
 #define SVM_REG_R14 (14)
 #define SVM_REG_R15 (15)
 
-#endif /* CONFIG_SVM */
-
 #endif /* __ASM_X86_HVM_SVM_H__ */
index 14d8e9194a564b0c25065c175cb30db29725c900..97a8837c21b9c4cf200f9ac38390523134b38844 100644 (file)
@@ -23,8 +23,6 @@
 #include <asm/config.h>
 #include <asm/hvm/hvm.h>
 
-#ifdef CONFIG_SVM
-
 extern int start_svm(void);
 
 /* general 1 intercepts */
@@ -488,8 +486,6 @@ enum {
 #define VMCB_EFLAGS_RESERVED_0          0xffc08028 /* bitmap for 0 */
 #define VMCB_EFLAGS_RESERVED_1          0x00000002 /* bitmap for 1 */
 
-#endif /* CONFIG_SVM */
-
 #endif /* ASM_X86_HVM_SVM_VMCS_H__ */
 
 /*
index b138aea90a27c6014aea6dadf1a5dfe7ff3f8ccf..41c40473f9a312bc2a2d221f6fd977fbf942b1a0 100644 (file)
@@ -22,8 +22,6 @@
 #ifndef __ASM_X86_HVM_SVM_VMMCALL_H__
 #define __ASM_X86_HVM_SVM_VMMCALL_H__
 
-#ifdef CONFIG_SVM
-
 /* VMMCALL command fields */
 #define VMMCALL_CODE_CPL_MASK     0xC0000000
 #define VMMCALL_CODE_MBZ_MASK     0x3FFF0000
@@ -43,6 +41,4 @@ static inline int get_vmmcall_cpl(int cmd)
     return (cmd & VMMCALL_CODE_CPL_MASK) >> 30;
 }
 
-#endif /* CONFIG_SVM */
-
 #endif /* __ASM_X86_HVM_SVM_VMMCALL_H__ */
index c5f4b8c613caee1efac442b49ae5fe8688d5e8d3..5e0a11c40f213101c28cb3d4ee2e93f18c5176be 100644 (file)
 
 #include <asm/hvm/io.h>
 #include <asm/hvm/vlapic.h>
-
-#ifdef CONFIG_VMX
 #include <asm/hvm/vmx/vmcs.h>
-#endif
-#ifdef CONFIG_SVM
 #include <asm/hvm/svm/vmcb.h>
-#endif
 
 struct hvm_vcpu {
     unsigned long       ioflags;
@@ -36,12 +31,8 @@ struct hvm_vcpu {
     struct vlapic       *vlapic;
 
     union {
-#ifdef CONFIG_VMX
         struct arch_vmx_struct vmx;
-#endif
-#ifdef CONFIG_SVM
         struct arch_svm_struct svm;
-#endif
     } u;
 };
 
index 606cf40ef6e18297a0db827c923b1723104d6ad2..40161b72315f1639328152451de196c72f6cefee 100644 (file)
@@ -19,8 +19,6 @@
 #ifndef __ASM_X86_HVM_VMX_CPU_H__
 #define __ASM_X86_HVM_VMX_CPU_H__
 
-#ifdef CONFIG_VMX
-
 /*
  * Virtual CPU
  */
@@ -34,6 +32,4 @@ struct arch_state_struct {
 #define VMX_MF_32       1
 #define VMX_MF_64       2
 
-#endif /* CONFIG_VMX */
-
 #endif /* __ASM_X86_HVM_VMX_CPU_H__ */
index 8092969e492bc8575f9966595dcd1d3b67980cea..84b407367b284e531e9df97f47fc93adbbf21ddb 100644 (file)
@@ -24,8 +24,6 @@
 #include <asm/hvm/vmx/cpu.h>
 #include <public/hvm/vmx_assist.h>
 
-#ifdef CONFIG_VMX
-
 extern int start_vmx(void);
 extern void stop_vmx(void);
 
@@ -248,8 +246,6 @@ enum vmcs_field {
     HOST_RIP                        = 0x00006c16,
 };
 
-#endif /* CONFIG_VMX */
-
 #endif /* ASM_X86_HVM_VMX_VMCS_H__ */
 
 /*
index 7d6d2bce92a2939d5ff008bb2626c56039ba878a..52b0551c124083acd71dc8a310766292e67ee212 100644 (file)
@@ -26,8 +26,6 @@
 #include <asm/hvm/vmx/vmcs.h>
 #include <asm/i387.h>
 
-#ifdef CONFIG_VMX
-
 extern void vmx_asm_vmexit_handler(struct cpu_user_regs);
 extern void vmx_asm_do_resume(void);
 extern void vmx_asm_do_launch(void);
@@ -458,6 +456,4 @@ static inline int vmx_reflect_exception(struct vcpu *v)
     return 0;
 }
 
-#endif /* CONFIG_VMX */
-
 #endif /* __ASM_X86_HVM_VMX_VMX_H__ */